package com.example.springmybatis.service;

import com.example.springmybatis.entity.Community;
import com.example.springmybatis.entity.Communitycategory;
import com.example.springmybatis.mapper.Communitymapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Communityservice {
    @Resource
    private Communitymapper communitymapper;

    public List<Community> getcommunity(){
        List<Community> communities=communitymapper.selectAll();
        return communities;
    }
    public List<Communitycategory> getcategory(){
        List<Communitycategory> communitycategoryList=communitymapper.selectcateAll();
        return communitycategoryList;
    }
}
